﻿<UserControl
    x:Class="App12.MyControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App12"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Height="100" Width="Auto">
    
    <d:UserControl.DataContext>
        <local:MyControlViewModel Number="-1" Letter="~K" />
    </d:UserControl.DataContext>

    <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left">
        <ContentControl Content="{Binding Number}" 
                        ContentTemplate="{StaticResource MyContentControl}" />
        <ListView ItemsSource="{Binding Letters}" IsHitTestVisible="False"
                  ItemTemplate="{StaticResource MyContentControl}"
                  SelectedItem="{Binding Letter, Mode=TwoWay}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <ItemsStackPanel Orientation="Horizontal"/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ListView>
    </StackPanel>
</UserControl>
